import RPi.GPIO as GPIO
import time

########### init GPIO #####################
AvoidSensorLeft = 32
AvoidSensorRight = 11
Buzzer = 24

GPIO.setmode(GPIO.BOARD)
GPIO.setwarnings(False)
GPIO.setup(AvoidSensorLeft, GPIO.IN)
GPIO.setup(AvoidSensorRight, GPIO.IN)
GPIO.setup(Buzzer, GPIO.OUT, initial=1)

while True:
    time.sleep(0.1)
    LeftSensorValue = GPIO.input(AvoidSensorLeft)
    RightSensorValue = GPIO.input(AvoidSensorRight)
    closed = LeftSensorValue == False or RightSensorValue == False
    print(LeftSensorValue, RightSensorValue, closed)
